#include "XMeshNode.h"

XMeshNode::XMeshNode(){
	m_mesh = NULL;
}

XMeshNode::~XMeshNode(){
	m_mesh->Release();
}

void XMeshNode::Update(){

}

void XMeshNode::Render(){
	XRender::GetInstance()->SetWorldMatrix(m_finalMatrix);
	if (m_mesh!=NULL)
		m_mesh->Render();
}

void XMeshNode::SetMesh(XMesh *mesh){
	if (mesh!=NULL)
		m_mesh = mesh;
}
